<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('订单手工支付')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-payment-add" th:object="${jtOrder}">
            <input type="hidden" name="orderId" th:value="*{orderId}"/>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">[[#{orderNo}]]：</label>
                    <div class="col-sm-8">
                        <span th:text="*{orderNo}"></span>
                    </div>
                </div>
            </div>
            <div class="col-xs-12" th:if="*{reduceAmount != null}">
                <div class="form-group">
                    <label class="col-sm-3 control-label">[[#{discounts}]]：</label>
                    <div class="col-sm-8">
                        <span>-</span>
                        <span th:text="*{currency}"></span>
                        <span th:text="*{reduceAmount}"></span>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">[[#{totalAmount}]]：</label>
                    <div class="col-sm-8">
                        <span th:text="*{currency}"></span>
                        <span th:text="*{orderAmount}"></span>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">[[#{transactionNumber}]]：</label>
                    <div class="col-sm-8">
                        <input name="transactionNo" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">[[#{paymentAmount}]]：</label>
                    <div class="col-sm-8">
                        <input name="paymentAmount" class="form-control" type="number" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">[[#{remark}]]：</label>
                    <div class="col-sm-8">
                        <textarea name="params[remark]" class="form-control" rows="5"></textarea>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "business/order"
        $("#form-rating-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/payment", $('#form-payment-add').serialize());
            }
        }
    </script>
</body>
</html>